﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PokerStar.Core;

namespace PokerStar
{
    /// <summary>
    /// Summary description for game
    /// </summary>
    public class GameHandler : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            var game = new Game(9);
            game.AddPlayer(new Player("玛尔斯"));
            game.AddPlayer(new Player("悠悠"));
            game.AddPlayer(new Player("文森特"));
            game.AddPlayer(new Player("叶紫喜"));
            game.AddPlayer(new Player("囧"));
            game.AddPlayer(new Player("海伦"));
            game.AddPlayer(new Player("阿兰哥"));
            game.AddPlayer(new Player("高歌"));
            game.AddPlayer(new Player("韦恩"));


            game.Play();
            var rs = game.GetStatistics();



            context.Response.ContentType = "text/plain";
            context.Response.Write(rs);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}